#include "DownWidget.h"

#include <qlayout.h>

#include "Label.h"

DownWidget::DownWidget(QWidget * parent, const char * name)
	: QWidget(parent, name)
{
	QColor bgColor(Qt::white);
	setPaletteBackgroundColor(bgColor);

	QVBoxLayout * pVBoxLayout = new QVBoxLayout(this);
	pVBoxLayout->setMargin(6);
	pVBoxLayout->setSpacing(4);

	QHBoxLayout * pHBoxLayout = new QHBoxLayout;
	pHBoxLayout->addStretch();

	QLabel * pLabelPhoto = new QLabel(this);
	pLabelPhoto->setPixmap(QPixmap::fromMimeSource("images/photo.png"));
	pHBoxLayout->addWidget(pLabelPhoto);


	pVBoxLayout->addLayout(pHBoxLayout);

	pVBoxLayout->addStretch();

	QFrame * pFrame = new QFrame(this);
	pFrame->setPaletteForegroundColor(QColor(162, 162, 162));
	pFrame->setFrameShape(QFrame::HLine);
	pVBoxLayout->addWidget(pFrame);

	pUrlLabelJid = new UrlLabel(this);
	pUrlLabelJid->setPaletteBackgroundColor(bgColor);
	pUrlLabelJid->setBackgroundOrigin(QLabel::ParentOrigin);
	pUrlLabelJid->setText(tr("your@email.here"));
	QFont font("Arial", 9);
	pUrlLabelJid->setFont(font);
	pVBoxLayout->addWidget(pUrlLabelJid);
}

DownWidget::~DownWidget()	
{
//	qDebug("~DownWidget");
}
